home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20041116-20060924
/
000359_fdc@columbia.edu_Wed May 17 10:31:50 2006.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
2KB
Path: newsmaster.cc.columbia.edu!not-for-mail
From: Frank da Cruz <fdc@columbia.edu>
Newsgroups: comp.protocols.kermit.misc
Subject: Re: anyway to set time?
Date: 17 May 2006 14:31:07 GMT
Organization: Columbia University
Lines: 33
Message-ID: <slrne6mctb.kea.fdc@sesame.cc.columbia.edu>
References: <FoAag.8717$A26.221054@ursa-nb00s0.nbnet.nb.ca>
Reply-To: fdc@columbia.edu
NNTP-Posting-Host: sesame.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1147876267 6095 128.59.59.56 (17 May 2006 14:31:07 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 17 May 2006 14:31:07 GMT
User-Agent: slrn/0.9.8.0 (SunOS)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15616
On 2006-05-17, Scott Caissie <scottac@nb.sympatico.ca> wrote:
: I have here an odd project that I don't think is possible, but I'm going to
: ask anyway.
:
: With the K95 2.1.3 commands, is there a way to set a date rather than rely
: on the computer's time? Theres slightly over a dozen functions, variables
: and basic commands used to display the date in a multitude of ways. But can
: you set it inside K95? I'm looking to trick K95 into thinking it was the day
: before.
:
: Local users can't change the computer's date. Access restricted and thats
: not going to change. I really don't want the users doing that anyway every
: single day.
:
It seems you are asking for a way for Kermit to apply an offset to the
date-time returned by queries to the system. The answer is yes, but you
have to do it explicitly. \v(timestamp) is the Kermit variable that returns
the current date and time (as obtained from the system). At the point at
which you obtain this, you can apply the desired offset, e.g.:
.now := \fcvtdate(\v(timestamp) -1day)
But of course each time you fetch the date, you would have to do it again.
There is no way to tell Kermit to set a given internal date/time and use
it instead of the one returned by the system, transparently to the rest of
the script. But you could come close by making your own function:
define mytimestamp { return \fcvtdate(\v(timestamp) -1day) }
and then anywhere you want to get the adjusted current date/time, refer to
\fexec(mytimestamp) rather than \v(timestamp).
- Frank